import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int count = 0;
            int n = sc.nextInt();
            int[] array = new int[10000];
            int k = 0;
            for (int i = 2; i <= n / 2; i++) {
                int flag = 1;
                for (int j = 2; j < i; j++) {
                    if (i % j == 0) {
                        flag = 0;
                        break;
                    }
                }
                if (flag == 1) {
                    array[k++] = i;
                }
            }
            for (int i = 0; i < k; i++) {
                if (n % array[i] == 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
